#include "sdl_resource.h"

template<> sdl_ptr<sdl_resource_loader> sdl_singleton<sdl_resource_loader>::__field = NULL;

std::ostream & operator<<(std::ostream & o, sdl_resource & r)
{
    o << r.name;
    if (r.mode == sdl_resource::path)
        o << "@file:" << r.get_path_str();
    if (r.mode == sdl_resource::stream)
        o << "@stream";
    if (r.mode == sdl_resource::rwops)
        o << "@rwops";
    if (r.mode == sdl_resource::undef)
        o << "@undefined";
    return o;
}

